package com.dream.service.impl;

import com.dream.dao.SecurityDao;
import com.dream.service.SecurityService;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UsernameNotFoundException;

/**
 * Created by IntelliJ IDEA.
 * User: ZhongGang
 * Date: 12-12-23
 * Time: 上午12:58
 */
public class SecurityServiceImpl implements SecurityService {
    private SecurityDao securityDao;

    @Override
    public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
        return securityDao.findUserByUsername(username);
    }

    public void setSecurityDao(SecurityDao securityDao) {
        this.securityDao = securityDao;
    }
}
